package com.yan.domain;

public class Rectangle {
    private double chang;
    private double kuan;

    public Rectangle(double chang, double kuan) {
        this.chang = chang;
        this.kuan = kuan;
    }

    public Rectangle() {

    }

    public double getChang() {
        return chang;
    }

    public void setChang(double chang) {
        this.chang = chang;
    }

    public double getKuan() {
        return kuan;
    }

    public void setKuan(double kuan) {
        this.kuan = kuan;
    }

    public double getArea() {
        return (chang * kuan);
    }

    public double getPerimeter() {
        return (chang + chang + kuan + kuan);
    }

    public String getInfo() {
        return ("长:" + chang + ",宽:" + kuan + ",面积:" + getArea() + "周长:" + getPerimeter());
    }
}
